<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
	<head>
	    <base href="<%=basePath%>">
		<title>会员信息</title>
        <%@include file="../collect/meta.jsp"%>
        <link rel="stylesheet" href="${ctx }/css/radius.css" type="text/css"></link>
        <script type="text/javascript" src="${ctx}/js/returnTop.js"></script>
	</head>
	<body lang="zh-cn">
	  <div class="wrapper">	
       <c:import url="/collect/top.jsp"></c:import>
		<div class="main-container" id="main-container">
			<div class="main-container-inner">
				<c:import url="/collect/left.jsp"></c:import>
				<div class="main-content">
					<div class="breadcrumbs" id="breadcrumbs">
						<ul class="breadcrumb">
							<li><i class="icon-home home-icon"></i>会员管理</li>
							<li>${member.mobile }</li>
						</ul><!-- .breadcrumb -->
					</div>
					<div class="page-content">
						<div class="row">
							<div class="col-xs-12">
								<!-- PAGE CONTENT BEGINS --> 
              		<div class="row-fluid">
						<div class="span10">
							<fieldset align="center"><legend>会员信息</legend></fieldset> 
						    <table class="table table-striped table-bordered table-hover">
						       <thead>
							      <tr>
							         <td>手机号：${member.mobile }</td>
							         <td>姓名：
							         	<c:if test="${not empty member.name }">
							         		${member.name }
							         	</c:if>
							         </td>
							         <td>性别：
							         	<c:if test="${not empty member.sex }">
							         		${member.sex }
							         	</c:if>
							         </td>
              					     <td>会员积分：${fn:substring(baseMember.score, 0, fn:indexOf(baseMember.score, '.0')) }</td>
              					     <td>会员等级：${baseMember.level }</td>
              					     <td>会员余额：${baseMember.balance }</td>
              					     <td>注册时间：${fn:substring(member.createTime, 0, fn:indexOf(member.createTime, '.')) }</td>
							      </tr>
							   </thead>
							</table>
							<fieldset align="center"><legend>消费记录</legend></fieldset> 
							<table class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th><div align="center">消费金额</div></th>
										<th><div align="center">付款方式</div></th>
										<th><div align="center">购物店铺</div></th>
										<th><div align="center">购物时间</div></th>
									</tr>
								</thead>
								<tbody>
								<c:forEach items="${consumes}" var="consume" varStatus="status">
								  <c:if test="${status.count<=20}">
					                <tr>
					                   <td><div align="center">${consume.money }</div></td>
					                   <td><div align="center"><c:if test="${consume.type==0 }">现金</c:if><c:if test="${consume.type==1 }">账户余额</c:if></div></td>
					                   <td><div align="center">${consume.shop.name}</div></td>
					                   <td><div align="center">${consume.createTime }</div></td>
					                </tr>
					              </c:if>
				                </c:forEach>
								</tbody>
							</table>
							<fieldset align="center"><legend>充值记录</legend></fieldset> 
							<table class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th><div align="center">充值金额</div></th>
										<th><div align="center">充值店铺</div></th>
										<th><div align="center">充值时间</div></th>
									</tr>
								</thead>
								<tbody>
								<c:forEach items="${balances}" var="balance" varStatus="status">
								  <c:if test="${status.count<=20}">
					                <tr>
					                   <td><div align="center">${balance.money }</div></td>
					                   <td><div align="center">${balance.shop.name}</div></td>
					                   <td><div align="center">${balance.createTime }</div></td>
					                </tr>
					              </c:if>
				                </c:forEach>
									<tr>
										<th colspan="4">
										   <div align="center"><a class="btn btn-primary radius" href="member!getAllMember?index=${index }">返回</a></div>
										</th>
									</tr>
								</tbody>
							</table>
						</div>
					</div>
			 		<!-- PAGE CONTENT ENDS -->
							</div><!-- /.col -->
						</div><!-- /.row -->
					</div><!-- /.page-content -->
				</div><!-- /.main-content -->
			</div><!-- /.main-container-inner -->
			<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse" style="position:fixed;bottom:0;">
				<i class="icon-double-angle-up icon-only bigger-110"></i>
			</a>
		</div><!-- /.main-container -->
		<div class="push"></div>
     </div>
     <c:import url="/collect/down.jsp"></c:import>
     
     <script type="text/javascript">
		$(document).ready(function() {
			//防收回；会员管理：$查看会员
			$('.membership > ul').show();
			$('.membership > ul > li > a').eq(0).css("color", "red");
		});
	</script>
</body>
</html>
